<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib tagdir="/WEB-INF/tags/simpletable" prefix="simpletable"%>
<%@ taglib uri="http://www.rapid-framework.org.cn/rapid" prefix="rapid" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<meta http-equiv="Cache-Control" content="no-store"/>
	<meta http-equiv="Pragma" content="no-cache"/>
	<meta http-equiv="Expires" content="0"/>	
	<!-- 全局CSS -->
	<link href="<c:url value="/styles/global.css"/>" type="text/css" rel="stylesheet">
	<!-- 列表CSS -->
	<link href="<c:url value="/styles/tableStyle.css"/>" type="text/css" rel="stylesheet">
	<!-- 分页控件CSS -->
	<link href="<c:url value="/widgets/simpletable/simpletable.css"/>" type="text/css" rel="stylesheet">
	<!-- jquery基本库 -->
	<script src="<c:url value="/scripts/jquery.js"/>" type="text/javascript"></script>
	<!-- JS日历 -->
	<script src="<c:url value="/scripts/My97DatePicker/WdatePicker.js"/>" type="text/javascript"></script>
	<!-- 系统辅助JS -->
	<script src="<c:url value="/scripts/application.js"/>" type="text/javascript"></script>
	<!-- 列表删除和批量删除JS -->
	<script src="${ctx}/scripts/rest.js" ></script>
	<!-- 分页控件 -->
	<script type="text/javascript" src="<c:url value="/widgets/simpletable/simpletable.js"/>"></script>
	<script type="text/javascript" >
		$(document).ready(function() {
			//分页
			window.simpleTable = new SimpleTable('queryForm',${page.thisPageNumber},${page.pageSize},'${pageRequest.sortColumns}');
		
			//自动调整列表搜索框的宽度（框的ID必须统一）
			var thwidth=[];
			$('#thline th').each(function(){
				thwidth.push($(this).css("width"));
			});
			$('#trsearch td').each(function(index,val){
				if(index != 0)
					$(this).children().css("width",parseInt(thwidth[index]));
			});
		});

		//清除列表搜索条件
		function resetAndReload(url){
			document.queryForm.reset();
			location.href=url;
		}
	</script>
	<base href="<%=basePath%>">
	<rapid:block name="head"/>
</head>
<body>
	<form id="queryForm" name="queryForm" method="get" style="display: inline;">
		<div id="divBg" style="height:638px; width:834px; background-image: url(<c:out value="${ctx}"/>/styles/images/mainright.jpg);">
			<rapid:block name="toolbar"/>	
			<rapid:block name="content"/>
		</div>	
	</form>
	<%@ include file="/commons/messages.jsp" %>
</body>
</html>	